#/usr/bin/perl

require "./mailadmin-lib.pl";
my (%vdlist, $k, $i);

&header($text{'index_title'}, "", "index", -1, 1);

&get_vdomain_list(\%vdlist);

print "<form action=index.cgi method=post onsubmit=''>\n";
#table total virturl domain
print "<table class=mode1 border=1 width=100%>\n";

print "<tr><td valign=top width=80%>\n";

#list table of virturl domain
print "<table class=mode1 width=100% border=1>\n";
print "<tr class=title1><td width=70%><b>Virturl domain name</b></td><td><b>Totol users</b></td></tr>\n";
$i = 0;
my $cls;

foreach $k (sort keys %vdlist)
{
	if ($i % 2) {$cls = 'class=mode2' } else {$cls = 'class=mode1'};	
	print "<tr $cls><td>$k</td><td>$vdlist{$k}</td></tr>\n";
	$i++;
}
print "</table>\n";

print "</td><td valign=top>\n";

print "<table>";
print "<tr><td><input class=button type=submit value='Add Domain'></td></tr>\n";
print "<tr><td><input class=button type=submit value='Delete Domain'></td></tr>\n";
print "<tr><td><input class=button type=submit value='Search User'></td></tr>\n";
print "</table>";
print "</td></tr>\n";

print "</table>";

print "<hr>";

print "<table class=mode1>\n";
print "<tr><td><b>set newuser default config: <b><input class=button1 type=submit value='config'></td></tr>\n";

print "<tr><td><b>view mail queue:</b><input class=button1 type=submit value='view'></td></tr>\n";



print "<tr><td></td></tr>";

print "</table>\n";

print "</form>\n";

&footer("", $text{"index"});
